#ifndef FSM_H
#define FSM_H
/********************************************
 ** Purpose: To change control of the agent
 ** state in order to simulate different
 ** behaviors for steering in regards
 ** to a specific set of conditions being met.
 ********************************************/
#include "cSteeringBehaviors.h"

//Controls the information regarding a state
struct State
{
	//Different state types for simulating the steering behavior
	enum { IDLE = 0, WANDER = 1, SEEK = 2, FLEE = 3, ATTACK = 4, DEAD = 5 };

	//Holds the type of the state
	int type;
};

/**************************************
 ** Purpose:
 ** Transition each state based on a
 ** condition that regards the steering
 ** behavior
 **************************************/
class cFSM
{
	public:
		cFSM(int initialState = 0);
		~cFSM();
		 
		//Update the current state of the enemy
		//state which will provide
		void updateState();

		//Changes the current state
		void changeState(State state);
		
		//Returns the current state
		State getCurrentState();

	private:
		State m_currentState;
		State m_initialState;
		State m_previousState;
};
#endif